// https://umijs.org/config/
import { defineConfig } from 'umi';

export default defineConfig({
  plugins: [
    // https://github.com/zthxxx/react-dev-inspector
    'react-dev-inspector/plugins/umi/react-inspector',
  ],
  // https://github.com/zthxxx/react-dev-inspector#inspector-loader-props
  inspectorConfig: {
    exclude: [],
    babelPlugins: [],
    babelOptions: {},
  },



  // 根目录
  base: '/portal/',
  publicPath: 'https://djgovtest.iwhalecloud.com/portal/',

  define: {
    APP_TYPE: 'boletest',
    'process.env.BASE_URL': 'https://djgovtest.iwhalecloud.com/',
    'process.env.MOBILE_BASE_URL': 'https://djgovtest.iwhalecloud.com/mobile',
    'process.env.CAPTCHA': 'https://djgovtest.iwhalecloud.com/boleadmin/captcha.jpg',
    'process.env.OSS_URL': 'https://mlxc-test.oss-cn-hangzhou.aliyuncs.com',
    'process.env.PROJECT_NAME': 'boleadmin',
    'process.env.WEBSOCKET_URL': 'wss://djgovtest.iwhalecloud.com//boleadmin/' // 后端测试websocket Url
  },
  // 接口代理
  proxy: {
    '/boleadmin': {
      "target": "https://djgovtest.iwhalecloud.com/",
      'changeOrigin': true,
      'secure': true,
      'pathRewrite': {
        '^/boleadmin' : '/boleadmin'
        // '^/djcloudadmin' : '/djcloudadmin'
      },
    }
  }


});
